from django.conf.urls.defaults import *


urlpatterns = patterns('cataloguesite.mainapp',

    url(r'^$', 'views.index', name = 'main_index'),


    #book
    url(r'^books/$', "books.index", name = 'books_index'),
    url(r'^books/ajax/$', "books.ajax", name = 'books_ajax'),
    url(r'^books/search_auto/$', "books.search_auto", name = 'books_search_auto'),
    url(r'^books/add_auto/(?P<asin>\w+)/$', "books.add_auto", name = 'books_add_auto'),
    url(r'^books/add/$', "books.add", name = 'books_add'),
    url(r'^books/add/authors/$', "books.add_author", name = 'books_add_author'),
    url(r'^books/add/publisher/$', "books.add_publisher", name = 'books_add_publisher'),
    url(r'^books/edit/(?P<book_id>\w+)/$', "books.edit", name = 'books_edit'),


    #cd
    url(r'^cds/search_auto/$', "cds.search_auto", name = 'cds_search_auto'),

)
